tests: Don't dump stuff twice for tables
authorBenjamin Otte <otte@redhat.com>
Tue, 15 Nov 2011 21:18:40 +0000 (22:18 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 16 Nov 2011 03:39:25 +0000 (04:39 +0100)
Captions and headers are printed as part of the children, so we can
avoid the duplication by just printing the name.

tests/a11y/accessibility-dump.c
tests/a11y/appchooser.txt
tests/a11y/tree.txt

index b2c79f85eeaaf0f710ac4153872266ea97f54911..19c4edc4ed47472d48611bb5d1563f0a5b1af40b 100644 (file)
@@ -513,10 +513,6 @@ dump_atk_streamable_content (AtkStreamableContent *content,
   g_string_append_c (string, '\n');
 }
 
-static void dump_accessible (AtkObject *accessible,
-                             guint      depth,
-                             GString   *string);
-
 static void
 dump_atk_table (AtkTable *table,
                 guint     depth,
@@ -532,17 +528,11 @@ dump_atk_table (AtkTable *table,
 
   obj = atk_table_get_summary (table);
   if (obj)
-    {
-      g_string_append_printf (string, "%*s<summary>\n", depth, "");
-      dump_accessible (obj, depth, string);
-    }
+    g_string_append_printf (string, "%*ssummary: %s\n", depth, "", get_name (obj));
 
   obj = atk_table_get_caption (table);
   if (obj)
-    {
-      g_string_append_printf (string, "%*s<caption>\n", depth, "");
-      dump_accessible (obj, depth, string);
-    }
+    g_string_append_printf (string, "%*scaption: %s\n", depth, "", get_name (obj));
 
   g_string_append_printf (string, "%*srows: %d\n", depth, "", atk_table_get_n_rows (table));
   g_string_append_printf (string, "%*scolumns: %d\n", depth, "", atk_table_get_n_columns (table));
@@ -577,10 +567,7 @@ dump_atk_table (AtkTable *table,
         g_string_append_printf (string, "%*scolumn %d description: %s\n", depth, "", i, desc);
       obj = atk_table_get_column_header (table, i);
       if (obj)
-        {
-          g_string_append_printf (string, "%*s<column %d header>\n", depth, "", i);
-          dump_accessible (obj, depth, string);
-        }
+        g_string_append_printf (string, "%*scolumn %d header: %s\n", depth, "", i, get_name (obj));
     }
 
   for (i = 0; i < atk_table_get_n_rows (table); i++)
@@ -590,10 +577,7 @@ dump_atk_table (AtkTable *table,
         g_string_append_printf (string, "%*srow %d description: %s\n", depth, "", i, desc);
       obj = atk_table_get_row_header (table, i);
       if (obj)
-        {
-          g_string_append_printf (string, "%*s<row %d header>\n", depth, "", i);
-          dump_accessible (obj, depth, string);
-        }
+        g_string_append_printf (string, "%*srow %d header: %s\n", depth, "", i, get_name (obj));
     }
 }
 
index 7ee2fcc41c7162c981d7276a477245e202380fe6..d2f9384915efbabe5acc664f57c40bd2e096fb91 100644 (file)
@@ -105,22 +105,7 @@ window1
               rows: 1
               columns: 1
               column 0 description: 
-              <column 0 header>
-              unnamed-GtkButtonAccessible-6
-                "table column header"
-                parent: unnamed-GtkTreeViewAccessible-5
-                index: 0
-                name: 
-                state: enabled focusable selectable sensitive
-                toolkit: gtk
-                <AtkComponent>
-                layer: widget
-                alpha: 1
-                <AtkImage>
-                image size: -1 x -1
-                image description: (null)
-                <AtkAction>
-                action 0 name: click
+              column 0 header: unnamed-GtkButtonAccessible-6
               unnamed-GtkButtonAccessible-6
                 "table column header"
                 parent: unnamed-GtkTreeViewAccessible-5
index 4e54aa6558a67dd8a957e6057d90da77491e0b9d..27f2b8d916f7ae42e192c39e44f202754fc05476 100644 (file)
@@ -23,39 +23,9 @@ window1
     columns: 2
     selected rows: 0
     column 0 description: Column 1
-    <column 0 header>
-    unnamed-GtkButtonAccessible-0
-      "table column header"
-      parent: tree1
-      index: 0
-      name: Column 1
-      state: enabled sensitive showing visible
-      toolkit: gtk
-      <AtkComponent>
-      layer: widget
-      alpha: 1
-      <AtkImage>
-      image size: -1 x -1
-      image description: (null)
-      <AtkAction>
-      action 0 name: click
+    column 0 header: unnamed-GtkButtonAccessible-0
     column 1 description: Column 2
-    <column 1 header>
-    unnamed-GtkButtonAccessible-1
-      "table column header"
-      parent: tree1
-      index: 1
-      name: Column 2
-      state: enabled sensitive showing visible
-      toolkit: gtk
-      <AtkComponent>
-      layer: widget
-      alpha: 1
-      <AtkImage>
-      image size: -1 x -1
-      image description: (null)
-      <AtkAction>
-      action 0 name: click
+    column 1 header: unnamed-GtkButtonAccessible-1
     unnamed-GtkButtonAccessible-0
       "table column header"
       parent: tree1